package control.action;

import java.util.List;

import model.VWanted;
import model.Varticle;
import business.factory.daos;


public class SeachstrAction extends BaseAction {
	
	private String seachstring;
	private String post;
	
	

	public String getSeachstring() {
		return seachstring;
	}



	public void setSeachstring(String seachstring) {
		this.seachstring = seachstring;
	}



	public String getPost() {
		return post;
	}



	public void setPost(String post) {
		this.post = post;
	}



	/**
	 * @return
	 */
	public String execute() {
		List<Varticle> artlist  = daos.articledao.getarticles();
		request.setAttribute("artlist", artlist);
		
		List<VWanted> liststu = daos.wanteddao.getV_Wantedsby(seachstring, post, "", "", 0, 0);
		int thenum = liststu.size();
		request.setAttribute("thenum", thenum);
		request.setAttribute("liststu", liststu);
		
		return SUCCESS;
	}
}